/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package BusinessLogic;

import Entity.*;
import EntityState.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import javax.ejb.Local; 
import org.apache.commons.fileupload.FileItem;

/**
 *
 * @author James
 */
@Local
public interface PartnerBeanLocal {
    public int checkAvailability(String username);
    public int registerAccount(String username, String password, String IC, String firstName, String lastName, String gender, String countryCode, String phone, String email, String country, String province, String city, int accountLevel, int[] listOfPrivileges, long partnerID, long outletID);
    public int activateUser(String id);
    public PartnerAccountState login(String username, String password, String timezone);
    public boolean checkPrivilege(String username, int requiredPrivilege);
    public List<PartnerPrivilegeState> getFullListOfPrivileges();
    public boolean checkAccountLevel(String username1, String username2);
    public boolean checkAccountLevel(String username, int requiredAccountLevel);
    public int addItem(String name, String description, HashMap pictures, HashMap pictDescriptions, int type, int discount, int price, int redeemPrice, int additionalLoyaltyPoint, int maxNumberOfPeople, boolean selling, long[] subItemIDs, long categoryID, long termID) throws Exception;
    public int addItemCategory(String name, String description, long partnerID, long outletID);
    public int addOutlet(String name, String address1, String address2, String postalCode, String countryCode, String phone, String country, String province, String city, String businessEmail, long partnerID, HashMap pictures, HashMap pictDescriptions, FileItem layout) throws Exception;
    public int addReservableUnit(String name, String description, int numOfCustomersPerUnit, int numOfAvailableUnits, long itemID, long outletID, HashMap pictures, HashMap pictDescriptions, FileItem layout) throws Exception;
    public ArrayList getInfo(int action, long id);
    public int delete(int target, long id);
    public int addTerm(String name, String content, long partnerID);
 
    //public void viewBill
    //public void viewServicePlanSub
    
    //public List<Cubes> getCubes();
    public Cubes viewCube(long cubeId, long partnerId);
    public int updateCube(long cubeId, long partnerId, long termsId, String name, String description, int type, int discount, int price, int redeemPrice, int additionalLoyaltyPoint, int maxNumOfBuyers, long startDate, long endDate);
    public int delCube(long cubeId, long partnerId);
    public int requestCubeActivation(long cubeId, long partnerId);
    public int removeCubeActivation(long cubeId, long partnerId);
    public int checkVoucher(long voucherId, long partnerId);
    public String redeemVoucher(long voucherId, long partnerId);
}
